<% _admin_menu_draw = admin_menu_draw %>
<!DOCTYPE html>
<html>
<head>
  <title>Zerocms Admin</title>
  <%= stylesheet_link_tag "zerocms/admin/admin-manifest", media: "all" %>
  <script>
    var root_url = '<%= zerocms_root_url(locale: nil) %>';
    var root_admin_url = '<%= zerocms_admin_url(locale: nil) %>';
    var NO_IMAGE_URL = '<%= asset_url("zerocms/image-not-found.png") %>';
    var CURRENT_LOCALE = '<%= current_locale %>';
    var ADMIN_TRANSLATIONS = <%= raw current_site.get_languages.to_json %>;
    var tinymce_global_settings = {language_url: "<%= asset_path("zerocms/admin/tinymce/langs/#{current_locale}.js") %>", custom_css: [], custom_toolbar: [], post_render: [], init: [], setups: [], settings: []};
    var I18n_data = <%= I18n.backend.respond_to?(:translations) ? I18n.backend.send(:translations)[current_locale.to_sym][:zerocms][:admin][:js].to_json.html_safe : !!(I18n.backend.backends[1] && I18n.backend.backends[1].backends[1]) ? I18n.backend.backends[1].backends[1].send(:translations)[current_locale.to_sym][:zerocms][:admin][:js].to_json.html_safe : "{}" rescue "{}" %>
  </script>
  <%= javascript_include_tag "zerocms/admin/admin-manifest" %>

  <%= javascript_include_tag "zerocms/admin/jquery_validate/#{current_locale}.js" if current_locale != 'en' %>
  <%= javascript_include_tag "zerocms/admin/momentjs/#{current_locale}.js" if current_locale != 'en' %>
  <%= raw the_head({}, false) %>
  <%= yield :head if content_for? :head %>
</head>

<body class="hold-transition skin-blue sidebar-mini" data-intro="<%= current_site.get_option("save_intro") %>">

	<%= yield :before_content if content_for? :before_content %>
	<%= raw zerocms_content_before_draw %>

	<div class="wrapper">
		
		<%= render partial: "layouts/zerocms/admin/sidebar", locals: {_admin_menu_draw: _admin_menu_draw} %>
		
		<!-- Right Page -->
		<div id="page-wrapper" class="gray-bg <%= @extra_class %>">
			<!-- Top nav bar -->
			<%= render 'layouts/zerocms/admin/header' %>
				
			<!-- Main View -->
			<div class="content-wrapper">
				<section class="content" id="admin_content">
          <ol class="breadcrumb"><%= render_breadcrumbs :tag => :li, :separator => "" %></ol>
          <%= render "zerocms/flash_messages" %>
          <%= yield %>
        </section>
			</div>

			<!-- Footer -->
      <%= render 'layouts/zerocms/admin/footer' %>
		</div>
	</div>

	<%= raw zerocms_content_after_draw %>
	<%= yield :after_content if content_for? :after_content %>

</body>
</html>
